package Ctr;
import Model.*;

/**
 * Write a description of class OrdreCtr here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class OrdreCtr
{
    // instance variables - replace the example below with your own
    private OrdreContainer oc;
    private Delordre o;
    /**
     * Constructor for objects of class OrdreCtr
     */
    public OrdreCtr()
    {
        oc = OrdreContainer.getInstance();
    } 

    /**
     * this method adds an orderobjekt to the collection 
     * 
     * @param orderNr, dato
     * @return nothing
     */
    public void addOrdre(Ordre newOrdre)
    {
        oc.addOrdre(newOrdre);
    }

    /**
     * this method serch for an order through ordreNr and returns it
     * 
     * @param ordreNr
     * @return nothing
     */
    public Ordre findOrdre(int ordreNr)
    {
        return oc.findOrdre(ordreNr);
    }

    /**
     * this method removes a ordre by searching on ordreNr
     * 
     * @param ordreNr
     * @return nothing
     */
    public void removeOrdre(int ordreNr)
    {
        oc.removeOrdre(ordreNr);
    }

    /**
     * this method returns myFaktura form OrdreContainer
     * 
     * @param nothing
     * @return oc.myFaktura()
     */
    public String myString()
    {
        return oc.myFaktura();
    }
}
